<?xml version="1.0" encoding="UTF-8" ?>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="dataAccess.DbWriter"%>
<%@page import="java.util.ArrayList"%>
<%@page import="epam.car.rent.*"%>
<%@ taglib uri="/WEB-INF/mytaglib.tld" prefix="mytag" %>
<%@ page import="java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CarRentSystem</title>
    <link type="text/css" href="css/custom-theme/jqueryui1.8.6.custom.css" rel="Stylesheet" />
    <link type="text/css" href="css/reset.css" rel="Stylesheet" />
    <link type="text/css" href="css/loginblock.css" rel="Stylesheet" />
    <link type="text/css" href="css/layout.css" rel="Stylesheet" />     
	<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
    <script type="text/javascript" src="js/loginblock.js"></script>
 	
 	<mytag:loadpanels />
 

</head>

<body>
	<mytag:langswitch />
    <div id="globalWrap">
        <div id="header">
                <div id="logo"></div>
                <div id="caption"><%=session.getValue("index.slogan")%></div>
            </div>
            <br clear="all" />
            <div id="wrapper">
            	<div id="panelsWrapper">
                <div id="loginblock">
                        <div id="formWrapper">
                        <div id="login" class="ui-mygrad-dark ui-corner-all inputfields">
                            <form action="<%=getServletContext().getContextPath() %>/Login">
	                            <label for="login"><%=session.getValue("loginBlock.login")%></label> 
	                            <input type="text" id="login" name="login" />
	                            <label for="password"><%=session.getValue("loginBlock.password")%></label>
	                            <input type="password" id="pass" name="password" />
	                            <br clear="all"/>
	                            <input type="submit" value="<%=session.getValue("loginBlock.dologin")%>" class="submit">
                            </form>
                            <div class="note">
                                <a href="#" id="doRemind"><%=session.getValue("loginBlock.doremind")%></a> | 
                                <a href="#" id="doRegister"><%=session.getValue("loginBlock.doregister")%></a>
                            </div>
                        </div>
                        <div id="register" class="ui-mygrad-dark ui-corner-all inputfields">
                            <form action="<%=getServletContext().getContextPath() %>/Register">
                                <label for="name"><%=session.getValue("loginBlock.name")%>:</label>
                                <input name="name" type="text" class='textinput' />
                                      
                                <label for="pid"><%=session.getValue("loginBlock.login")%>:</label>
                                <input name="pid" type="text" class='textinput' />
                                
                                <label for="money"><%=session.getValue("loginBlock.money")%>:</label>
                                <input name="money" type="text" class='textinput' />
                                      
                                <label for="email"><%=session.getValue("loginBlock.email")%>:</label>
                                <input name="email" type="text" class='textinput' />
                                      
                                 <label for="password"><%=session.getValue("loginBlock.password")%>:</label>
                                 <input name="password" type="password" class='textinput' id="pass1"/>
                                 
                                 <label for="passwordAgain"><%=session.getValue("loginBlock.password2")%>:</label>
                                 <input name="passwordAgain" type="password" class='textinput' id="pass2"/>
                                 <br clear="all"/>
                                 <div id="errors" class="ui-state-error">
                                    <p id="incorrectPass">Passwords aren't match!</p>
                                 </div>
                                 <input type="submit" id="Register" value="<%=session.getValue("loginBlock.doregister")%>" class="submit" />
                            </form>
                            <div class="note">
                                <a href="#" id="doLogin"><%=session.getValue("loginBlock.dologin")%></a> | <a href="#" id="doRemind"><%=session.getValue("loginBlock.doremind")%></a>
                            </div>
                        </div>
                        <div id="remind" class="ui-mygrad-dark ui-corner-all inputfields">
                            <form action="<%=getServletContext().getContextPath() %>/Remind">
                                <label for="email"><%=session.getValue("loginBlock.email")%></label>
                                <input name="email" type="text" class='textinput' />
                                <br clear="all"/>
                                <input type="submit" id="Remind password" value="<%=session.getValue("loginBlock.doremind")%>" class="submit" />
                            </form>
                            <div class="note">
                                <a href="#" id="doLogin"><%=session.getValue("loginBlock.dologin")%></a> | <a href="#" id="doRegister"><%=session.getValue("loginBlock.doregister")%></a>
                            </div>
                        </div>
                    </div>
                 </div><!-- END OF LOGINBLOCK --> 
                 
                 <!-- if logged in, show the menu -->
                 <div id="currInfo" class="ui-mygrad-dark ui-corner-all inputfields">
                       
                        <% if (session.getAttribute("clientID") != null) { %>
						    <%@ include file="clientMenu.crm" %>
						<% } else if (session.getAttribute("adminID") != null){ %>
						    <%@ include file="adminMenu.crm" %>
						<% } %>

                 </div>
                   <!-- end of logged-in menu-->
                   </div>
                <div id="content">
                    <div id="car">
                    </div>
                    <br clear="all" />
                    <div id="contentData">
                    	<div id="output" class="ui-mygrad-dark ui-corner-all inputfields">
							
							<h2><%=session.getValue("layout.cars")%></h2>
							
							<mytag:listcars />
							
                        </div>
					</div>
                </div> <!-- end of content--> 
                <br clear="all" />
                <div id="footer" class="ui-mygrad-dark ui-corner-all inputfields">
      				&copy;&nbsp;Tretyak&nbsp;Alexander<br />Epam-Bravo-2010
		      </div>       
             </div>

      </div>
</body>
</html>

